/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package quizzempire.view;

import java.util.Observable;
import java.util.Observer;
import quizzempire.model.Model;

/**
 *
 * @author Victor
 */
public class StartGame extends javax.swing.JFrame implements Observer{

    /**
     * Creates new form StartGame
     */
    Model model;
    
    public StartGame(Model model) {
        initComponents();
        this.model = model;
        model.addObserver(this);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        DIFFICULTY = new java.awt.Label();
        toggleEasy = new javax.swing.JToggleButton();
        toggleMedium = new javax.swing.JToggleButton();
        toggleHard = new javax.swing.JToggleButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        quizzList = new javax.swing.JList();
        jPanel1 = new javax.swing.JPanel();
        lbDifficulty = new javax.swing.JLabel();
        lbGenre = new javax.swing.JLabel();
        lbNumQuestions = new javax.swing.JLabel();
        lbQuizBy = new javax.swing.JLabel();
        lbQuizDescription = new javax.swing.JLabel();
        btStartGame = new javax.swing.JButton();
        btMainMenu = new javax.swing.JButton();
        btLoadQuiz = new javax.swing.JButton();
        lbLogo = new javax.swing.JLabel();

        javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1);
        jLayeredPane1.setLayout(jLayeredPane1Layout);
        jLayeredPane1Layout.setHorizontalGroup(
            jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jLayeredPane1Layout.setVerticalGroup(
            jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setFont(new java.awt.Font("Aharoni", 0, 14)); // NOI18N

        DIFFICULTY.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
        DIFFICULTY.setText("DIFFICULTY");

        toggleEasy.setText("Easy");
        toggleEasy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleEasyActionPerformed(evt);
            }
        });

        toggleMedium.setText("Medium");

        toggleHard.setText("Hard");

        quizzList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        quizzList.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                quizzListMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(quizzList);

        jPanel1.setBackground(new java.awt.Color(204, 204, 204));

        lbDifficulty.setText("difficulty");

        lbGenre.setText("genre");

        lbNumQuestions.setText("questions");

        lbQuizBy.setText("by");

        lbQuizDescription.setText("descricao");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(lbGenre)
                        .addGap(31, 31, 31)
                        .addComponent(lbDifficulty)
                        .addGap(31, 31, 31)
                        .addComponent(lbNumQuestions))
                    .addComponent(lbQuizBy)
                    .addComponent(lbQuizDescription))
                .addContainerGap(28, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbGenre)
                    .addComponent(lbDifficulty)
                    .addComponent(lbNumQuestions))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lbQuizBy)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lbQuizDescription)
                .addContainerGap(49, Short.MAX_VALUE))
        );

        btStartGame.setText("START GAME");
        btStartGame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btStartGameActionPerformed(evt);
            }
        });

        btMainMenu.setText("MAIN MENU");
        btMainMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btMainMenuActionPerformed(evt);
            }
        });

        btLoadQuiz.setText("LOAD");
        btLoadQuiz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btLoadQuizActionPerformed(evt);
            }
        });

        lbLogo.setText("LOGO");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btMainMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btLoadQuiz)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(toggleEasy, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(toggleMedium, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(toggleHard, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btStartGame, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(DIFFICULTY, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(76, 76, 76)
                        .addComponent(DIFFICULTY, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(toggleEasy, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(toggleMedium, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(toggleHard, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lbLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btLoadQuiz))
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btStartGame, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btMainMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void toggleEasyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleEasyActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_toggleEasyActionPerformed

    private void btLoadQuizActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btLoadQuizActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btLoadQuizActionPerformed

    private void btMainMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btMainMenuActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btMainMenuActionPerformed

    private void btStartGameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btStartGameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btStartGameActionPerformed

    private void quizzListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_quizzListMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_quizzListMouseClicked



    public void update(Observable o , Object arg){
    //TODO
    } 
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private java.awt.Label DIFFICULTY;
    private javax.swing.JButton btLoadQuiz;
    private javax.swing.JButton btMainMenu;
    private javax.swing.JButton btStartGame;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lbDifficulty;
    private javax.swing.JLabel lbGenre;
    private javax.swing.JLabel lbLogo;
    private javax.swing.JLabel lbNumQuestions;
    private javax.swing.JLabel lbQuizBy;
    private javax.swing.JLabel lbQuizDescription;
    private javax.swing.JList quizzList;
    private javax.swing.JToggleButton toggleEasy;
    private javax.swing.JToggleButton toggleHard;
    private javax.swing.JToggleButton toggleMedium;
    // End of variables declaration//GEN-END:variables
}
